package application.model 
{
	import application.ApplicationFacade;
	import application.model.VO.PhotoViewVO;
	import org.puremvc.as3.interfaces.IProxy;
	import org.puremvc.as3.patterns.proxy.Proxy;
	/**
	 * ...
	 * @author Ning
	 */
	public class PhotoViewProxy extends Proxy implements IProxy
	{
		public static const NAME:String = 'PhotoViewProxy';
		private var _layoutProxy:LayoutProxy;
		public function PhotoViewProxy() 
		{
			super(NAME, new PhotoViewVO);
			_layoutProxy = facade.retrieveProxy(LayoutProxy.NAME) as LayoutProxy;
		}
		public function setConfig():void
		{
			var configXML:XMLList = AppGlobal.CONFIG_XML.photoView;
			photoViewVO.hotAreaWidth =Number(configXML.@['hotAreaWidth']);
			photoViewVO.hotAreaHeight =Number(configXML.@['hotAreaHeight']);
			photoViewVO.hotBtnWidth = Number(configXML.@['hotBtnWidth']);
			photoViewVO.hotBtnHeight =Number(configXML.@['hotBtnHeight']);
			photoViewVO.hotBimapWidth = Number(AppGlobal.CONFIG_XML.photoArea.@['photoWidth']);
			photoViewVO.hotBimapHeight = Number(AppGlobal.CONFIG_XML.photoArea.@['photoHeight']);
			photoViewVO.exitBtnLayout = _layoutProxy.getLayout(AppGlobal.PHOTO_VIEW_EXIT_BTN_LAYOUT_KEY);
			sendNotification(ApplicationFacade.UPDATE_PHOTO_VIEW_CONFIG, photoViewVO);
		}
		private function get photoViewVO():PhotoViewVO {
			return data as PhotoViewVO;
		}
		
	}

}